Skip to content

Fixed DeprecationWarning on pkg_import.#112

Open
numshub wants to merge 2 commits into4teamwork:masterfrom
numshub:master
Open

Fixed DeprecationWarning on pkg_import.#112
numshub wants to merge 2 commits into4teamwork:masterfrom
numshub:master

Conversation

@numshub
Copy link

@numshub numshub commented Jul 9, 2025

Upgraded code to replace pkg_resources.resource_string with equivalent importlib functionality.

Copy link

@waketzheng waketzheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be import importlib.resources as importlib_resources instead of import importlib_resources

from six import binary_type
from six import text_type
import pkg_resources
#import pkg_resources

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove it, do not leave it as a comment line. So does line 112 and 113.

Removed old lines of code
Changed import of importlib.resources
@numshub
Copy link
Author

numshub commented Jul 24, 2025

Fixed as requested in review.

@zephvr
Copy link

zephvr commented Jul 25, 2025

This MR seems to be a duplicate of #91

@matthuisman
Copy link

matthuisman commented Feb 8, 2026

I think PR #113 should be preferred :)
That has the pkg_import fix as well as migrating to pyproject etc

@matthuisman
Copy link

I have published a new pypi package called docxcompose3
Which is simply docxcompose with PR #113 and few fixes to packaging

https://pypi.org/project/docxcompose3/

You should be able to simply swap your dependency to this and then work with newer setuptools

Hopefully this can help others :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants